/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaz;

import datos.Diente;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.io.Serializable;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import negocio.ui.uiClinica;

/**
 *
 * @author David
 */
public class expedienteFrame extends javax.swing.JFrame implements Serializable{
    
    uiClinica ui = uiClinica.getInstance();
    
    /**
     * Creates new form expedienteFrame
     */
    
    /**
     * ********************SECCION ODONTOGRAMA************************************
     */
    Diente d;

    //private boolean pestanaActiva = false;
    
    

    int x4;
    int y4;
    int cont5=0;
    int x5;
    int y5;    
   /*Eduntulo Total*/
    
    /**
     * ***************************SECCION ODONTOGRAMA********************************
     */
    
    
    
    public expedienteFrame() {
        initComponents();
        //this.setSize(800, 600);
        this.pack();
        
        /**********************SECCION ODONTOGRAMA*************************************/
        
        //addMouseListener(this);
        //jListTipos.addListSelectionListener(this);
        d = new Diente();
         // jPanelOdontograma.p;
        inicializaEnBlanco();

    
      /*****************************SECCION ODONTOGRAMA*********************************/
        
        
        
        
        
        if(list_clientes.getSelectionModel().isSelectionEmpty()){
            tabs_expediente.setEnabled(false);
            setEnableTabs(main_historia_medica, false);
        }        
    }
    
    
    
    
    
     /*****************************SECCION ODONTOGRAMA*********************************/
    
    public void inicializaEnBlanco()
    {
        for(int cont=0;cont<2;cont++)
        {
            for(int cont2=0;cont2<16;cont2++)
            {
                for(int cont3=0;cont3<5;cont3++)
                {
                    d.getColorDienteP()[cont][cont2][cont3] = Color.WHITE;
                }
            }
        }
        
        for(int cont=0;cont<2;cont++)
        {
            for(int cont2=0;cont2<10;cont2++)
            {
                for(int cont3=0;cont3<5;cont3++)
                {
                    d.getColorDienteT()[cont][cont2][cont3] = Color.WHITE;
                }
            }
        }
    }
    
    
    
    public void EdentuloTotal() {
        int contador = d.getContadorEduntuloTotal();
        d.getEduntuloTotal()[contador][0] = x4;
        d.getEduntuloTotal()[contador][1] = y4;
        d.getEduntuloTotal()[contador][2] = x5 - x4;
        d.getEduntuloTotal()[contador][3] = 5;
        contador++;
        d.setContadorEduntuloTotal(contador);
    }

    public void cargaIDs() {
        ui.cargaIDs(getjComboBoxIDs());
    }
    
    
          /*****************************SECCION ODONTOGRAMA*********************************/
        
    
    
    
    
    
    
    /**
     * Este metodo activa o desactiva todos los elementos de un Panel.
     */
    private void setEnableTabs(JPanel panel, boolean en){
            for(int i = 0; i < panel.getComponentCount();i++){
                panel.getComponent(i).setEnabled(en);
            }
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PresenciaDePatologia = new javax.swing.ButtonGroup();
        Caries = new javax.swing.ButtonGroup();
        ProblemasPeriodental = new javax.swing.ButtonGroup();
        ProblemasATM = new javax.swing.ButtonGroup();
        OtroTipoDePatologia = new javax.swing.ButtonGroup();
        expediente_panel = new javax.swing.JPanel();
        label_titulo = new javax.swing.JLabel();
        tabs_expediente = new javax.swing.JTabbedPane();
        tab_historia_medica = new javax.swing.JPanel();
        scroll_historia_medica = new javax.swing.JScrollPane();
        main_historia_medica = new javax.swing.JPanel();
        label_nombre_medico_historia = new javax.swing.JLabel();
        label_tipo_sangre_historia = new javax.swing.JLabel();
        label_caso_emergencia_historia = new javax.swing.JLabel();
        label_telefono_emergencia_historia = new javax.swing.JLabel();
        label_direccion_emergencia_historia = new javax.swing.JLabel();
        txt_nombre_medico_historia = new javax.swing.JTextField();
        txt_caso_emergencia_historia = new javax.swing.JTextField();
        txt_telefono_emergencia_historia = new javax.swing.JTextField();
        txt_direccion_emergencia_historia = new javax.swing.JTextField();
        label_parentesco_emergencia_historia = new javax.swing.JLabel();
        label_pregunta_1_historia = new javax.swing.JLabel();
        txt_parentesco_emergencia_historia = new javax.swing.JTextField();
        label_pregunta_2_historia = new javax.swing.JLabel();
        label_pregunta_3_historia = new javax.swing.JLabel();
        label_pregunta_4_historia = new javax.swing.JLabel();
        label_pregunta_5_historia = new javax.swing.JLabel();
        label_pregunta6_historia = new javax.swing.JLabel();
        txt_pregunta_1_historia = new javax.swing.JTextField();
        txt_pregunta_2_historia = new javax.swing.JTextField();
        txt_pregunta_3_historia = new javax.swing.JTextField();
        txt_pregunta_5_historia = new javax.swing.JTextField();
        txt_pregunta_4_historia = new javax.swing.JTextField();
        txt_pregunta_6_historia = new javax.swing.JTextField();
        label_pregunta_7_historia = new javax.swing.JLabel();
        txt_pregunta_7_historia = new javax.swing.JTextField();
        combo_tipo_sangre_historia = new javax.swing.JComboBox();
        tab_tratamientos = new javax.swing.JPanel();
        scroll_tratamientos = new javax.swing.JScrollPane();
        table_trataminetos = new javax.swing.JTable();
        btn_agregar_trataminetos = new javax.swing.JButton();
        btn_modificar_tratamientos = new javax.swing.JButton();
        btn_eliminar_trataminetos = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jPanelOdontograma =         new javax.swing.JPanel(){

            public void paint(Graphics g) {
                super.paint(g);
                Graphics2D g2 = (Graphics2D) g;

                d.crearDiente(g2);
                d.edentuloTotal(g2);

            }
        };
        ;
        jScrollPane1 = new javax.swing.JScrollPane();
        jListTipos = new javax.swing.JList();
        jLabel2 = new javax.swing.JLabel();
        jButtonBorrar = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jButtoncargarOdontograma = new javax.swing.JButton();
        jComboBoxIDs = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        btn_guardar_Odontograma = new javax.swing.JButton();
        tab_examenes = new javax.swing.JPanel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTextAreaEspecificar = new javax.swing.JTextArea();
        jLabel43 = new javax.swing.JLabel();
        jRadioButtonOtroTipoPatologiaNO = new javax.swing.JRadioButton();
        jRadioButtonProATMNO = new javax.swing.JRadioButton();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jRadioButtonProATMSI = new javax.swing.JRadioButton();
        jRadioButtonOtroTipoPatologiaSI = new javax.swing.JRadioButton();
        jLabel37 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jRadioButtonCarieNO = new javax.swing.JRadioButton();
        jRadioButtonCarieSI = new javax.swing.JRadioButton();
        jRadioButtonProPeriodentalSI = new javax.swing.JRadioButton();
        jRadioButtonProPeriodentalNO = new javax.swing.JRadioButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTextAreaObservaciones = new javax.swing.JTextArea();
        jLabel42 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jRadioButtonPrePatologiaSI = new javax.swing.JRadioButton();
        jRadioButtonPrePatologiaNO = new javax.swing.JRadioButton();
        jLabel50 = new javax.swing.JLabel();
        jLabel51 = new javax.swing.JLabel();
        jRadioButtonRadioPanoramica = new javax.swing.JRadioButton();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jRadioButtonRadioPeriapciales = new javax.swing.JRadioButton();
        jRadioButtonRadioAleta = new javax.swing.JRadioButton();
        jRadioButtonRadioOclusal = new javax.swing.JRadioButton();
        jRadioButtonOtroTipo = new javax.swing.JRadioButton();
        jLabel48 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        btn_guardar_expediente = new javax.swing.JButton();
        scroll_List_clientes = new javax.swing.JScrollPane();
        list_clientes = new javax.swing.JList();
        jLabel1 = new javax.swing.JLabel();
        menubar_expedienteF = new javax.swing.JMenuBar();
        menu_archivo_expedienteF = new javax.swing.JMenu();
        menuitem_Cerrar = new javax.swing.JMenuItem();
        menu_editar_expedienteF = new javax.swing.JMenu();

        setTitle("Expedientes");
        setMinimumSize(new java.awt.Dimension(800, 600));
        setResizable(false);

        expediente_panel.setBackground(new java.awt.Color(255, 255, 255));
        expediente_panel.setMinimumSize(new java.awt.Dimension(1000, 1000));
        expediente_panel.setPreferredSize(new java.awt.Dimension(790, 650));

        label_titulo.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        label_titulo.setText("Expediente");

        tabs_expediente.setBackground(new java.awt.Color(255, 255, 255));
        tabs_expediente.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        tabs_expediente.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tabs_expediente.setMaximumSize(new java.awt.Dimension(1000, 700));
        tabs_expediente.setMinimumSize(new java.awt.Dimension(1000, 700));
        tabs_expediente.setPreferredSize(new java.awt.Dimension(1000, 700));

        tab_historia_medica.setBackground(new java.awt.Color(255, 255, 255));

        main_historia_medica.setBackground(new java.awt.Color(255, 255, 255));
        main_historia_medica.setPreferredSize(new java.awt.Dimension(542, 700));

        label_nombre_medico_historia.setText("Nombre de su medico:");

        label_tipo_sangre_historia.setText("Tipo de Sangre:");

        label_caso_emergencia_historia.setText("En caso de emergencia avisar a:");

        label_telefono_emergencia_historia.setText("Telefono:");

        label_direccion_emergencia_historia.setText("Direccion:");

        label_parentesco_emergencia_historia.setText("Parentesco:");

        label_pregunta_1_historia.setText("1.Cual es su problema actual?");

        label_pregunta_2_historia.setText("2.Ha tenido una experiencia desagradable con un tratamiento dental? Explique brevemente.");

        label_pregunta_3_historia.setText("3.Ha estado bajo alguna atencion medica o ha sido operado en los ultimos 2 a~nos?");

        label_pregunta_4_historia.setText("4.Esta con tratamiento medico actualmente? Explique.");

        label_pregunta_5_historia.setText("5.Es usted alergico a algun medicamento o alimento? Especifique:");

        label_pregunta6_historia.setText("6.Ha tenido alguna vez sangrado prolongado que haya requerido atencion medica por alguna cirugia o trauma?");

        label_pregunta_7_historia.setText("7. Observaciones:");

        combo_tipo_sangre_historia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" }));

        javax.swing.GroupLayout main_historia_medicaLayout = new javax.swing.GroupLayout(main_historia_medica);
        main_historia_medica.setLayout(main_historia_medicaLayout);
        main_historia_medicaLayout.setHorizontalGroup(
            main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(main_historia_medicaLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addComponent(label_nombre_medico_historia)
                        .addGap(67, 67, 67)
                        .addComponent(txt_nombre_medico_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addComponent(label_tipo_sangre_historia)
                        .addGap(97, 97, 97)
                        .addComponent(combo_tipo_sangre_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addComponent(label_caso_emergencia_historia)
                        .addGap(18, 18, 18)
                        .addComponent(txt_caso_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addComponent(label_telefono_emergencia_historia)
                        .addGap(127, 127, 127)
                        .addComponent(txt_telefono_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addComponent(label_direccion_emergencia_historia)
                        .addGap(126, 126, 126)
                        .addComponent(txt_direccion_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addComponent(label_parentesco_emergencia_historia)
                        .addGap(115, 115, 115)
                        .addComponent(txt_parentesco_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(label_pregunta_1_historia)
                    .addComponent(txt_pregunta_1_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_pregunta_2_historia)
                    .addComponent(txt_pregunta_2_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_pregunta_3_historia)
                    .addComponent(txt_pregunta_3_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_pregunta_4_historia)
                    .addComponent(txt_pregunta_4_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_pregunta_5_historia)
                    .addComponent(txt_pregunta_5_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_pregunta6_historia)
                    .addComponent(txt_pregunta_6_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_pregunta_7_historia)
                    .addComponent(txt_pregunta_7_historia, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        main_historia_medicaLayout.setVerticalGroup(
            main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(main_historia_medicaLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(label_nombre_medico_historia))
                    .addComponent(txt_nombre_medico_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(label_tipo_sangre_historia))
                    .addComponent(combo_tipo_sangre_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(label_caso_emergencia_historia))
                    .addComponent(txt_caso_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(label_telefono_emergencia_historia))
                    .addComponent(txt_telefono_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(main_historia_medicaLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(label_direccion_emergencia_historia))
                    .addComponent(txt_direccion_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(main_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(label_parentesco_emergencia_historia)
                    .addComponent(txt_parentesco_emergencia_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(label_pregunta_1_historia)
                .addGap(6, 6, 6)
                .addComponent(txt_pregunta_1_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(label_pregunta_2_historia)
                .addGap(6, 6, 6)
                .addComponent(txt_pregunta_2_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(label_pregunta_3_historia)
                .addGap(6, 6, 6)
                .addComponent(txt_pregunta_3_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(label_pregunta_4_historia)
                .addGap(14, 14, 14)
                .addComponent(txt_pregunta_4_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(6, 6, 6)
                .addComponent(label_pregunta_5_historia)
                .addGap(11, 11, 11)
                .addComponent(txt_pregunta_5_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(label_pregunta6_historia)
                .addGap(11, 11, 11)
                .addComponent(txt_pregunta_6_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(label_pregunta_7_historia)
                .addGap(6, 6, 6)
                .addComponent(txt_pregunta_7_historia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(162, Short.MAX_VALUE))
        );

        scroll_historia_medica.setViewportView(main_historia_medica);

        javax.swing.GroupLayout tab_historia_medicaLayout = new javax.swing.GroupLayout(tab_historia_medica);
        tab_historia_medica.setLayout(tab_historia_medicaLayout);
        tab_historia_medicaLayout.setHorizontalGroup(
            tab_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scroll_historia_medica, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)
        );
        tab_historia_medicaLayout.setVerticalGroup(
            tab_historia_medicaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scroll_historia_medica, javax.swing.GroupLayout.DEFAULT_SIZE, 584, Short.MAX_VALUE)
        );

        tabs_expediente.addTab("Historia Medica", tab_historia_medica);

        tab_tratamientos.setBackground(new java.awt.Color(255, 255, 255));

        table_trataminetos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "#", "Fecha", "Pieza", "Descripcion", "Indicaciones"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        scroll_tratamientos.setViewportView(table_trataminetos);

        btn_agregar_trataminetos.setText("Agregar Tratamiento");
        btn_agregar_trataminetos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_agregar_trataminetosActionPerformed(evt);
            }
        });

        btn_modificar_tratamientos.setText("Modifcar Tratamiento");
        btn_modificar_tratamientos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_modificar_tratamientosActionPerformed(evt);
            }
        });

        btn_eliminar_trataminetos.setText("Eliminar Tratamiento");
        btn_eliminar_trataminetos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_eliminar_trataminetosActionPerformed(evt);
            }
        });

        jButton1.setText("Ver Tratamiento");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout tab_tratamientosLayout = new javax.swing.GroupLayout(tab_tratamientos);
        tab_tratamientos.setLayout(tab_tratamientosLayout);
        tab_tratamientosLayout.setHorizontalGroup(
            tab_tratamientosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scroll_tratamientos, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)
            .addGroup(tab_tratamientosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btn_agregar_trataminetos)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btn_modificar_tratamientos)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btn_eliminar_trataminetos)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
                .addContainerGap())
        );
        tab_tratamientosLayout.setVerticalGroup(
            tab_tratamientosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tab_tratamientosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(tab_tratamientosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_agregar_trataminetos)
                    .addComponent(btn_modificar_tratamientos)
                    .addComponent(btn_eliminar_trataminetos)
                    .addComponent(jButton1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(scroll_tratamientos, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE))
        );

        tabs_expediente.addTab("Tratamientos", tab_tratamientos);

        jPanelOdontograma.setMinimumSize(new java.awt.Dimension(1000, 650));
        jPanelOdontograma.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jPanelOdontogramaMouseClicked(evt);
            }
        });
        jPanelOdontograma.addContainerListener(new java.awt.event.ContainerAdapter() {
            public void componentAdded(java.awt.event.ContainerEvent evt) {
                jPanelOdontogramaComponentAdded(evt);
            }
        });

        jListTipos.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Carie", "Edentulo Total", "Aparato Ortodontico Fijo", "Aparato Ortodontico Removible", "Corona Definitiva", "Corona Temporal", "Desgaste Oclusal/Incisal", "Diastema", "Diente Ausente", "Diente Discromico", "Diente Ectopico", "Diente en clavija", "Diente Extruido", "Diente Intruido", "Fractura", "Geminacion/Fusion", "Giroversion", "Impactacion", "Implante", " " };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jListTipos.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jListTiposValueChanged(evt);
            }
        });
        jScrollPane1.setViewportView(jListTipos);

        jLabel2.setText("Disposiciones Especificas");

        jButtonBorrar.setText("Borrar");
        jButtonBorrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBorrarActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel3.setText("ODONTOGRAMA");

        jButtoncargarOdontograma.setText("Cargar Odontograma");
        jButtoncargarOdontograma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtoncargarOdontogramaActionPerformed(evt);
            }
        });

        jComboBoxIDs.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1" }));
        jComboBoxIDs.setToolTipText("");
        jComboBoxIDs.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jComboBoxIDsMouseClicked(evt);
            }
        });
        jComboBoxIDs.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxIDsActionPerformed(evt);
            }
        });

        jLabel4.setText("ID usuario");

        btn_guardar_Odontograma.setText("Guardar");
        btn_guardar_Odontograma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_guardar_OdontogramaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelOdontogramaLayout = new javax.swing.GroupLayout(jPanelOdontograma);
        jPanelOdontograma.setLayout(jPanelOdontogramaLayout);
        jPanelOdontogramaLayout.setHorizontalGroup(
            jPanelOdontogramaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelOdontogramaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelOdontogramaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelOdontogramaLayout.createSequentialGroup()
                        .addGroup(jPanelOdontogramaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addGroup(jPanelOdontogramaLayout.createSequentialGroup()
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jButtonBorrar)))
                        .addGap(138, 138, 138))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelOdontogramaLayout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(31, 31, 31)
                        .addComponent(btn_guardar_Odontograma)
                        .addGap(18, 18, 18)))
                .addComponent(jButtoncargarOdontograma)
                .addGap(18, 18, 18)
                .addComponent(jComboBoxIDs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel4)
                .addContainerGap(319, Short.MAX_VALUE))
        );
        jPanelOdontogramaLayout.setVerticalGroup(
            jPanelOdontogramaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelOdontogramaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelOdontogramaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jButtoncargarOdontograma)
                    .addComponent(jComboBoxIDs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(btn_guardar_Odontograma))
                .addGap(354, 354, 354)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelOdontogramaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelOdontogramaLayout.createSequentialGroup()
                        .addComponent(jButtonBorrar)
                        .addGap(9, 9, 9)))
                .addContainerGap(76, Short.MAX_VALUE))
        );

        tabs_expediente.addTab("Odontograma", jPanelOdontograma);

        tab_examenes.setBackground(new java.awt.Color(255, 255, 255));

        jLabel32.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        jLabel32.setText("Examen Radiografico");

        jLabel33.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        jLabel33.setText("Examen Clinico");

        jTextAreaEspecificar.setColumns(20);
        jTextAreaEspecificar.setRows(5);
        jScrollPane5.setViewportView(jTextAreaEspecificar);

        jLabel43.setText("Especificar:");

        OtroTipoDePatologia.add(jRadioButtonOtroTipoPatologiaNO);
        jRadioButtonOtroTipoPatologiaNO.setName("false");
        jRadioButtonOtroTipoPatologiaNO.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonOtroTipoPatologiaNOActionPerformed(evt);
            }
        });

        ProblemasATM.add(jRadioButtonProATMNO);
        jRadioButtonProATMNO.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonProATMNOActionPerformed(evt);
            }
        });

        jLabel34.setText("SI");

        jLabel35.setText("NO");

        ProblemasATM.add(jRadioButtonProATMSI);
        jRadioButtonProATMSI.setName("true");

        OtroTipoDePatologia.add(jRadioButtonOtroTipoPatologiaSI);
        jRadioButtonOtroTipoPatologiaSI.setName("true");
        jRadioButtonOtroTipoPatologiaSI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonOtroTipoPatologiaSIActionPerformed(evt);
            }
        });

        jLabel37.setText("Otro tipo de Patologia");

        jLabel36.setText("Problemas de A.T.M");

        jLabel40.setText("Problemas Periodental");

        jLabel39.setText("Caries");

        jLabel38.setText("SI");

        jLabel41.setText("NO");

        Caries.add(jRadioButtonCarieNO);
        jRadioButtonCarieNO.setName("false");

        Caries.add(jRadioButtonCarieSI);
        jRadioButtonCarieSI.setToolTipText("");
        jRadioButtonCarieSI.setName("true");

        ProblemasPeriodental.add(jRadioButtonProPeriodentalSI);
        jRadioButtonProPeriodentalSI.setName("true");

        ProblemasPeriodental.add(jRadioButtonProPeriodentalNO);
        jRadioButtonProPeriodentalNO.setName("false");

        jTextAreaObservaciones.setColumns(20);
        jTextAreaObservaciones.setRows(5);
        jScrollPane6.setViewportView(jTextAreaObservaciones);

        jLabel42.setText("Observaciones:");

        jLabel49.setText("Presencia de patologia:");

        PresenciaDePatologia.add(jRadioButtonPrePatologiaSI);
        jRadioButtonPrePatologiaSI.setName("true");

        PresenciaDePatologia.add(jRadioButtonPrePatologiaNO);
        jRadioButtonPrePatologiaNO.setName("false");

        jLabel50.setText("NO");

        jLabel51.setText("SI");

        jRadioButtonRadioPanoramica.setName("");

        jLabel44.setText("Radiografia Panoramica");

        jLabel45.setText("Radiografia Periapciales");

        jLabel46.setText("Radiografia Aleta");

        jLabel48.setText("Otro tipo");

        jLabel47.setText("Radiografia Oclusal");

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);

        javax.swing.GroupLayout tab_examenesLayout = new javax.swing.GroupLayout(tab_examenes);
        tab_examenes.setLayout(tab_examenesLayout);
        tab_examenesLayout.setHorizontalGroup(
            tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tab_examenesLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jLabel33))
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel39)
                            .addComponent(jLabel40))
                        .addGap(18, 18, 18)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(jLabel38))
                            .addComponent(jRadioButtonCarieSI)
                            .addComponent(jRadioButtonProPeriodentalSI))
                        .addGap(7, 7, 7)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(jLabel41))
                            .addComponent(jRadioButtonCarieNO)
                            .addComponent(jRadioButtonProPeriodentalNO)))
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(jLabel37))
                            .addComponent(jLabel36))
                        .addGap(24, 24, 24)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addComponent(jLabel34))
                            .addComponent(jRadioButtonProATMSI)
                            .addComponent(jRadioButtonOtroTipoPatologiaSI))
                        .addGap(2, 2, 2)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(jLabel35))
                            .addComponent(jRadioButtonProATMNO)
                            .addComponent(jRadioButtonOtroTipoPatologiaNO)))
                    .addComponent(jLabel43)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(36, 36, 36)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGap(45, 45, 45)
                        .addComponent(jLabel32))
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel44)
                            .addComponent(jLabel45)
                            .addComponent(jLabel46)
                            .addComponent(jLabel47)
                            .addComponent(jLabel48))
                        .addGap(16, 16, 16)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButtonRadioPanoramica)
                            .addComponent(jRadioButtonRadioPeriapciales)
                            .addComponent(jRadioButtonRadioAleta)
                            .addComponent(jRadioButtonRadioOclusal)
                            .addComponent(jRadioButtonOtroTipo)))
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(jLabel49)
                        .addGap(18, 18, 18)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel51)
                            .addComponent(jRadioButtonPrePatologiaSI))
                        .addGap(19, 19, 19)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel50)
                            .addComponent(jRadioButtonPrePatologiaNO)))
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel42)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(158, 158, 158))
        );
        tab_examenesLayout.setVerticalGroup(
            tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(tab_examenesLayout.createSequentialGroup()
                .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(tab_examenesLayout.createSequentialGroup()
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel33)
                            .addComponent(jLabel32))
                        .addGap(20, 20, 20)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(37, 37, 37)
                                .addComponent(jLabel39)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel40))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(20, 20, 20)
                                .addComponent(jLabel38)
                                .addGap(2, 2, 2)
                                .addComponent(jRadioButtonCarieSI)
                                .addGap(2, 2, 2)
                                .addComponent(jRadioButtonProPeriodentalSI))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(20, 20, 20)
                                .addComponent(jLabel41)
                                .addGap(2, 2, 2)
                                .addComponent(jRadioButtonCarieNO)
                                .addGap(2, 2, 2)
                                .addComponent(jRadioButtonProPeriodentalNO))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addComponent(jLabel44)
                                .addGap(6, 6, 6)
                                .addComponent(jLabel45)
                                .addGap(16, 16, 16)
                                .addComponent(jLabel46)
                                .addGap(6, 6, 6)
                                .addComponent(jLabel47)
                                .addGap(16, 16, 16)
                                .addComponent(jLabel48))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButtonRadioPanoramica)
                                    .addGroup(tab_examenesLayout.createSequentialGroup()
                                        .addGap(20, 20, 20)
                                        .addComponent(jRadioButtonRadioPeriapciales)))
                                .addGap(9, 9, 9)
                                .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButtonRadioAleta)
                                    .addGroup(tab_examenesLayout.createSequentialGroup()
                                        .addGap(20, 20, 20)
                                        .addComponent(jRadioButtonRadioOclusal))
                                    .addGroup(tab_examenesLayout.createSequentialGroup()
                                        .addGap(40, 40, 40)
                                        .addComponent(jRadioButtonOtroTipo)))))
                        .addGap(4, 4, 4)
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(19, 19, 19)
                                .addComponent(jLabel36)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel37))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addComponent(jLabel34)
                                .addGap(2, 2, 2)
                                .addComponent(jRadioButtonProATMSI)
                                .addGap(14, 14, 14)
                                .addComponent(jRadioButtonOtroTipoPatologiaSI))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addComponent(jLabel35)
                                .addGap(2, 2, 2)
                                .addComponent(jRadioButtonProATMNO)
                                .addGap(14, 14, 14)
                                .addComponent(jRadioButtonOtroTipoPatologiaNO))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(32, 32, 32)
                                .addComponent(jLabel49))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(jLabel51)
                                .addGap(6, 6, 6)
                                .addComponent(jRadioButtonPrePatologiaSI))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(jLabel50)
                                .addGap(6, 6, 6)
                                .addComponent(jRadioButtonPrePatologiaNO)))
                        .addGroup(tab_examenesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jLabel43)
                                .addGap(6, 6, 6)
                                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(tab_examenesLayout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel42)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(596, 596, 596))
        );

        tabs_expediente.addTab("Examenes", tab_examenes);

        btn_guardar_expediente.setText("Guardar");
        btn_guardar_expediente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_guardar_expedienteActionPerformed(evt);
            }
        });

        list_clientes.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "a", "b", "c" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        list_clientes.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                list_clientesValueChanged(evt);
            }
        });
        scroll_List_clientes.setViewportView(list_clientes);

        jLabel1.setText("Cliente");

        javax.swing.GroupLayout expediente_panelLayout = new javax.swing.GroupLayout(expediente_panel);
        expediente_panel.setLayout(expediente_panelLayout);
        expediente_panelLayout.setHorizontalGroup(
            expediente_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(expediente_panelLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(expediente_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(expediente_panelLayout.createSequentialGroup()
                        .addComponent(label_titulo)
                        .addGap(507, 507, 507)
                        .addComponent(btn_guardar_expediente))
                    .addGroup(expediente_panelLayout.createSequentialGroup()
                        .addGroup(expediente_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(scroll_List_clientes, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tabs_expediente, javax.swing.GroupLayout.PREFERRED_SIZE, 713, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );
        expediente_panelLayout.setVerticalGroup(
            expediente_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(expediente_panelLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(expediente_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(label_titulo)
                    .addGroup(expediente_panelLayout.createSequentialGroup()
                        .addGap(33, 33, 33)
                        .addComponent(btn_guardar_expediente)))
                .addGroup(expediente_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(expediente_panelLayout.createSequentialGroup()
                        .addGap(14, 14, 14)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(scroll_List_clientes, javax.swing.GroupLayout.PREFERRED_SIZE, 494, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(expediente_panelLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tabs_expediente, javax.swing.GroupLayout.PREFERRED_SIZE, 612, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        menu_archivo_expedienteF.setText("Archivo");

        menuitem_Cerrar.setText("Cerrar");
        menu_archivo_expedienteF.add(menuitem_Cerrar);

        menubar_expedienteF.add(menu_archivo_expedienteF);

        menu_editar_expedienteF.setText("Editar");
        menubar_expedienteF.add(menu_editar_expedienteF);

        setJMenuBar(menubar_expedienteF);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(expediente_panel, javax.swing.GroupLayout.PREFERRED_SIZE, 941, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(expediente_panel, javax.swing.GroupLayout.PREFERRED_SIZE, 682, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
            
    /*
     * Este metodo, es invocado una vez que se presiona el boton de agregar expediente
     */    
    private void btn_guardar_expedienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_guardar_expedienteActionPerformed
        //La variable agregado es null cuando el proceso fue exitoso de lo contrario, retorna el error.
        ui.guardar_expediente(this);
        ui.modificaExamenes(this);
    }//GEN-LAST:event_btn_guardar_expedienteActionPerformed

    private void list_clientesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_list_clientesValueChanged
        tabs_expediente.setEnabled(true);
        setEnableTabs(main_historia_medica, true);
        ui.cargar_expediente(this);
        ui.cargar_tratamientos_tabla(this);
        cargaIDs();
        ui.cargaExamen(this);
    }//GEN-LAST:event_list_clientesValueChanged

    private void jButtonVerOdontogramaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonVerOdontogramaActionPerformed
        ui.getOdonto().setVisible(true);
    }//GEN-LAST:event_jButtonVerOdontogramaActionPerformed

    private void jPanelOdontogramaComponentAdded(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_jPanelOdontogramaComponentAdded
        // TODO add your handling code here:
    }//GEN-LAST:event_jPanelOdontogramaComponentAdded

    private void jPanelOdontogramaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanelOdontogramaMouseClicked
        //PARA COLOREAR LOS DIENTES
        if (d.getColoreaCarie() && !d.getDibujaLinea()) {
            for (int cont = 0; cont < 2; cont++) {

                for (int cont2 = 0; cont2 < 16; cont2++) {

                    for (int cont3 = 0; cont3 < 5; cont3++) {

                        if (d.getParteDiente()[cont][cont2][cont3].contains(evt.getX(), evt.getY())) {
                            d.getColorDienteP()[cont][cont2][cont3] = d.getColorsito();
                        }
                    }
                }
            }
            for (int cont = 0; cont < 2; cont++) {

                for (int cont2 = 0; cont2 < 10; cont2++) {

                    for (int cont3 = 0; cont3 < 5; cont3++) {

                        if (d.getParteDienteT()[cont][cont2][cont3].contains(evt.getX(), evt.getY())) {
                            d.getColorDienteT()[cont][cont2][cont3] = d.getColorsito();
                        }
                    }
                }
            }
            repaint();
        }

        //PARA EDUNTULO TOTAL

        if (d.getDibujaLinea()) {
            cont5++;
            d.setColorsito(Color.white);

            if (cont5 == 1) {

                x4 = evt.getX();
                y4 = evt.getY();
            }

            if (cont5 == 2) {

                x5 = evt.getX();
                y5 = evt.getY();

                EdentuloTotal();
                d.setDibujaLinea(false);
                cont5 = 0;
                repaint();
            }

        }


    }//GEN-LAST:event_jPanelOdontogramaMouseClicked

    private void btn_guardar_OdontogramaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_guardar_OdontogramaActionPerformed
       ui.guardaOdontograma(Integer.parseInt(jComboBoxIDs.getSelectedItem().toString()), d, d.isObjetoModificado());
    }//GEN-LAST:event_btn_guardar_OdontogramaActionPerformed

    private void jComboBoxIDsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxIDsActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxIDsActionPerformed

    private void jComboBoxIDsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jComboBoxIDsMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxIDsMouseClicked

    private void jButtoncargarOdontogramaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtoncargarOdontogramaActionPerformed
        Diente diente = ui.cargarOdontograma(Integer.parseInt(jComboBoxIDs.getSelectedItem().toString()), d);
        if (diente != null) {
            d = diente;
            repaint();
        } else {
            JOptionPane.showMessageDialog(null, "No hay un Odontograma definido para este cliente");
        }

    
    }//GEN-LAST:event_jButtoncargarOdontogramaActionPerformed

    private void jButtonBorrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBorrarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonBorrarActionPerformed

    private void jListTiposValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListTiposValueChanged
   
        if (jListTipos.getSelectedValue().toString().equals("Carie")) {
            d.setColorsito(Color.red);
            d.setColoreaCarie(true);
        }

        if (jListTipos.getSelectedValue().toString().equals("Edentulo Total")) {
            d.setDibujaLinea(true);
        }


   
    }//GEN-LAST:event_jListTiposValueChanged

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        ui.verTratamiento(this);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void btn_eliminar_trataminetosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_eliminar_trataminetosActionPerformed
        ui.eliminarTratamiento(this);
    }//GEN-LAST:event_btn_eliminar_trataminetosActionPerformed

    private void btn_modificar_tratamientosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_modificar_tratamientosActionPerformed
        ui.modificar_tratamineto_frame(this);
    }//GEN-LAST:event_btn_modificar_tratamientosActionPerformed

    private void btn_agregar_trataminetosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_agregar_trataminetosActionPerformed
        ui.agregarTratamientoFrame(this);
    }//GEN-LAST:event_btn_agregar_trataminetosActionPerformed

    private void jRadioButtonOtroTipoPatologiaNOActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonOtroTipoPatologiaNOActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonOtroTipoPatologiaNOActionPerformed

    private void jRadioButtonProATMNOActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonProATMNOActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonProATMNOActionPerformed

    private void jRadioButtonOtroTipoPatologiaSIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonOtroTipoPatologiaSIActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonOtroTipoPatologiaSIActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(expedienteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(expedienteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(expedienteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(expedienteFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new expedienteFrame().setVisible(true);
            }
        });
    }

    public JPanel getExpediente_panel() {
        return expediente_panel;
    }

    public JLabel getLabel_titulo() {
        return label_titulo;
    }

    public JTabbedPane getTabs_expediente() {
        return tabs_expediente;
    }  

    public JList getList_clientes() {
        return list_clientes;
    }

    public JScrollPane getScroll_List_clientes() {
        return scroll_List_clientes;
    }

    public uiClinica getUi() {
        return ui;
    }

    public JButton getBtn_guardar_expediente() {
        return btn_guardar_expediente;
    }

    public void setBtn_guardar_expediente(JButton btn_guardar_expediente) {
        this.btn_guardar_expediente = btn_guardar_expediente;
    }

    public JComboBox getCombo_tipo_sangre_historia() {
        return combo_tipo_sangre_historia;
    }

    public void setCombo_tipo_sangre_historia(JComboBox combo_tipo_sangre_historia) {
        this.combo_tipo_sangre_historia = combo_tipo_sangre_historia;
    }


    public JLabel getjLabel1() {
        return jLabel1;
    }

    public void setjLabel1(JLabel jLabel1) {
        this.jLabel1 = jLabel1;
    }

    public JLabel getLabel_caso_emergencia_historia() {
        return label_caso_emergencia_historia;
    }

    public void setLabel_caso_emergencia_historia(JLabel label_caso_emergencia_historia) {
        this.label_caso_emergencia_historia = label_caso_emergencia_historia;
    }

    public JLabel getLabel_direccion_emergencia_historia() {
        return label_direccion_emergencia_historia;
    }

    public void setLabel_direccion_emergencia_historia(JLabel label_direccion_emergencia_historia) {
        this.label_direccion_emergencia_historia = label_direccion_emergencia_historia;
    }

    public JLabel getLabel_nombre_medico_historia() {
        return label_nombre_medico_historia;
    }

    public void setLabel_nombre_medico_historia(JLabel label_nombre_medico_historia) {
        this.label_nombre_medico_historia = label_nombre_medico_historia;
    }

    public JLabel getLabel_parentesco_emergencia_historia() {
        return label_parentesco_emergencia_historia;
    }

    public void setLabel_parentesco_emergencia_historia(JLabel label_parentesco_emergencia_historia) {
        this.label_parentesco_emergencia_historia = label_parentesco_emergencia_historia;
    }

    public JLabel getLabel_pregunta6_historia() {
        return label_pregunta6_historia;
    }

    public void setLabel_pregunta6_historia(JLabel label_pregunta6_historia) {
        this.label_pregunta6_historia = label_pregunta6_historia;
    }

    public JLabel getLabel_pregunta_1_historia() {
        return label_pregunta_1_historia;
    }

    public void setLabel_pregunta_1_historia(JLabel label_pregunta_1_historia) {
        this.label_pregunta_1_historia = label_pregunta_1_historia;
    }

    public JLabel getLabel_pregunta_2_historia() {
        return label_pregunta_2_historia;
    }

    public void setLabel_pregunta_2_historia(JLabel label_pregunta_2_historia) {
        this.label_pregunta_2_historia = label_pregunta_2_historia;
    }

    public JLabel getLabel_pregunta_3_historia() {
        return label_pregunta_3_historia;
    }

    public void setLabel_pregunta_3_historia(JLabel label_pregunta_3_historia) {
        this.label_pregunta_3_historia = label_pregunta_3_historia;
    }

    public JLabel getLabel_pregunta_4_historia() {
        return label_pregunta_4_historia;
    }

    public void setLabel_pregunta_4_historia(JLabel label_pregunta_4_historia) {
        this.label_pregunta_4_historia = label_pregunta_4_historia;
    }

    public JLabel getLabel_pregunta_5_historia() {
        return label_pregunta_5_historia;
    }

    public void setLabel_pregunta_5_historia(JLabel label_pregunta_5_historia) {
        this.label_pregunta_5_historia = label_pregunta_5_historia;
    }

    public JLabel getLabel_pregunta_7_historia() {
        return label_pregunta_7_historia;
    }

    public void setLabel_pregunta_7_historia(JLabel label_pregunta_7_historia) {
        this.label_pregunta_7_historia = label_pregunta_7_historia;
    }

    public JLabel getLabel_telefono_emergencia_historia() {
        return label_telefono_emergencia_historia;
    }

    public void setLabel_telefono_emergencia_historia(JLabel label_telefono_emergencia_historia) {
        this.label_telefono_emergencia_historia = label_telefono_emergencia_historia;
    }

    public JLabel getLabel_tipo_sangre_historia() {
        return label_tipo_sangre_historia;
    }

    public void setLabel_tipo_sangre_historia(JLabel label_tipo_sangre_historia) {
        this.label_tipo_sangre_historia = label_tipo_sangre_historia;
    }

    public JPanel getMain_historia_medica() {
        return main_historia_medica;
    }

    public void setMain_historia_medica(JPanel main_historia_medica) {
        this.main_historia_medica = main_historia_medica;
    }

    public JMenu getMenu_archivo_expedienteF() {
        return menu_archivo_expedienteF;
    }

    public void setMenu_archivo_expedienteF(JMenu menu_archivo_expedienteF) {
        this.menu_archivo_expedienteF = menu_archivo_expedienteF;
    }

    public JMenu getMenu_editar_expedienteF() {
        return menu_editar_expedienteF;
    }

    public void setMenu_editar_expedienteF(JMenu menu_editar_expedienteF) {
        this.menu_editar_expedienteF = menu_editar_expedienteF;
    }

    public JMenuBar getMenubar_expedienteF() {
        return menubar_expedienteF;
    }

    public void setMenubar_expedienteF(JMenuBar menubar_expedienteF) {
        this.menubar_expedienteF = menubar_expedienteF;
    }

    public JMenuItem getMenuitem_Cerrar() {
        return menuitem_Cerrar;
    }

    public void setMenuitem_Cerrar(JMenuItem menuitem_Cerrar) {
        this.menuitem_Cerrar = menuitem_Cerrar;
    }

    public JScrollPane getScroll_historia_medica() {
        return scroll_historia_medica;
    }

    public void setScroll_historia_medica(JScrollPane scroll_historia_medica) {
        this.scroll_historia_medica = scroll_historia_medica;
    }

    public JPanel getTab_examenes() {
        return tab_examenes;
    }

    public void setTab_examenes(JPanel tab_examenes) {
        this.tab_examenes = tab_examenes;
    }

    public JPanel getTab_historia_medica() {
        return tab_historia_medica;
    }

    public void setTab_historia_medica(JPanel tab_historia_medica) {
        this.tab_historia_medica = tab_historia_medica;
    }

    public JPanel getTab_tratamientos() {
        return tab_tratamientos;
    }

    public void setTab_tratamientos(JPanel tab_tratamientos) {
        this.tab_tratamientos = tab_tratamientos;
    }

    public JTextField getTxt_caso_emergencia_historia() {
        return txt_caso_emergencia_historia;
    }

    public void setTxt_caso_emergencia_historia(JTextField txt_caso_emergencia_historia) {
        this.txt_caso_emergencia_historia = txt_caso_emergencia_historia;
    }

    public JTextField getTxt_direccion_emergencia_historia() {
        return txt_direccion_emergencia_historia;
    }

    public void setTxt_direccion_emergencia_historia(JTextField txt_direccion_emergencia_historia) {
        this.txt_direccion_emergencia_historia = txt_direccion_emergencia_historia;
    }

    public JTextField getTxt_nombre_medico_historia() {
        return txt_nombre_medico_historia;
    }

    public void setTxt_nombre_medico_historia(JTextField txt_nombre_medico_historia) {
        this.txt_nombre_medico_historia = txt_nombre_medico_historia;
    }

    public JTextField getTxt_parentesco_emergencia_historia() {
        return txt_parentesco_emergencia_historia;
    }

    public void setTxt_parentesco_emergencia_historia(JTextField txt_parentesco_emergencia_historia) {
        this.txt_parentesco_emergencia_historia = txt_parentesco_emergencia_historia;
    }

    public JTextField getTxt_pregunta_1_historia() {
        return txt_pregunta_1_historia;
    }

    public void setTxt_pregunta_1_historia(JTextField txt_pregunta_1_historia) {
        this.txt_pregunta_1_historia = txt_pregunta_1_historia;
    }

    public JTextField getTxt_pregunta_2_historia() {
        return txt_pregunta_2_historia;
    }

    public void setTxt_pregunta_2_historia(JTextField txt_pregunta_2_historia) {
        this.txt_pregunta_2_historia = txt_pregunta_2_historia;
    }

    public JTextField getTxt_pregunta_3_historia() {
        return txt_pregunta_3_historia;
    }

    public void setTxt_pregunta_3_historia(JTextField txt_pregunta_3_historia) {
        this.txt_pregunta_3_historia = txt_pregunta_3_historia;
    }

    public JTextField getTxt_pregunta_4_historia() {
        return txt_pregunta_4_historia;
    }

    public void setTxt_pregunta_4_historia(JTextField txt_pregunta_4_historia) {
        this.txt_pregunta_4_historia = txt_pregunta_4_historia;
    }

    public JTextField getTxt_pregunta_6_historia() {
        return txt_pregunta_6_historia;
    }

    public void setTxt_pregunta_6_historia(JTextField txt_pregunta_6_historia) {
        this.txt_pregunta_6_historia = txt_pregunta_6_historia;
    }

    public JTextField getTxt_pregunta_7_historia() {
        return txt_pregunta_7_historia;
    }

    public void setTxt_pregunta_7_historia(JTextField txt_pregunta_7_historia) {
        this.txt_pregunta_7_historia = txt_pregunta_7_historia;
    }

    public JTextField getTxt_pregunta_5_historia() {
        return txt_pregunta_5_historia;
    }

    public void setTxt_pregunta_5_historia(JTextField txt_pregutna_5_historia) {
        this.txt_pregunta_5_historia = txt_pregutna_5_historia;
    }

    public JTextField getTxt_telefono_emergencia_historia() {
        return txt_telefono_emergencia_historia;
    }

    public void setTxt_telefono_emergencia_historia(JTextField txt_telefono_emergencia_historia) {
        this.txt_telefono_emergencia_historia = txt_telefono_emergencia_historia;
    }

    public JButton getBtn_agregar_trataminetos() {
        return btn_agregar_trataminetos;
    }

    public JButton getBtn_eliminar_trataminetos() {
        return btn_eliminar_trataminetos;
    }

    public JButton getBtn_modificar_tratamientos() {
        return btn_modificar_tratamientos;
    }

    public JScrollPane getScroll_tratamientos() {
        return scroll_tratamientos;
    }

    public JTable getTable_trataminetos() {
        return table_trataminetos;
    }
    
    
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup Caries;
    private javax.swing.ButtonGroup OtroTipoDePatologia;
    private javax.swing.ButtonGroup PresenciaDePatologia;
    private javax.swing.ButtonGroup ProblemasATM;
    private javax.swing.ButtonGroup ProblemasPeriodental;
    private javax.swing.JButton btn_agregar_trataminetos;
    private javax.swing.JButton btn_eliminar_trataminetos;
    private javax.swing.JButton btn_guardar_Odontograma;
    private javax.swing.JButton btn_guardar_expediente;
    private javax.swing.JButton btn_modificar_tratamientos;
    private javax.swing.JComboBox combo_tipo_sangre_historia;
    private javax.swing.JPanel expediente_panel;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButtonBorrar;
    private javax.swing.JButton jButtoncargarOdontograma;
    private javax.swing.JComboBox jComboBoxIDs;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JList jListTipos;
    private javax.swing.JPanel jPanelOdontograma;
    private javax.swing.JRadioButton jRadioButtonCarieNO;
    private javax.swing.JRadioButton jRadioButtonCarieSI;
    private javax.swing.JRadioButton jRadioButtonOtroTipo;
    private javax.swing.JRadioButton jRadioButtonOtroTipoPatologiaNO;
    private javax.swing.JRadioButton jRadioButtonOtroTipoPatologiaSI;
    private javax.swing.JRadioButton jRadioButtonPrePatologiaNO;
    private javax.swing.JRadioButton jRadioButtonPrePatologiaSI;
    private javax.swing.JRadioButton jRadioButtonProATMNO;
    private javax.swing.JRadioButton jRadioButtonProATMSI;
    private javax.swing.JRadioButton jRadioButtonProPeriodentalNO;
    private javax.swing.JRadioButton jRadioButtonProPeriodentalSI;
    private javax.swing.JRadioButton jRadioButtonRadioAleta;
    private javax.swing.JRadioButton jRadioButtonRadioOclusal;
    private javax.swing.JRadioButton jRadioButtonRadioPanoramica;
    private javax.swing.JRadioButton jRadioButtonRadioPeriapciales;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTextArea jTextAreaEspecificar;
    private javax.swing.JTextArea jTextAreaObservaciones;
    private javax.swing.JLabel label_caso_emergencia_historia;
    private javax.swing.JLabel label_direccion_emergencia_historia;
    private javax.swing.JLabel label_nombre_medico_historia;
    private javax.swing.JLabel label_parentesco_emergencia_historia;
    private javax.swing.JLabel label_pregunta6_historia;
    private javax.swing.JLabel label_pregunta_1_historia;
    private javax.swing.JLabel label_pregunta_2_historia;
    private javax.swing.JLabel label_pregunta_3_historia;
    private javax.swing.JLabel label_pregunta_4_historia;
    private javax.swing.JLabel label_pregunta_5_historia;
    private javax.swing.JLabel label_pregunta_7_historia;
    private javax.swing.JLabel label_telefono_emergencia_historia;
    private javax.swing.JLabel label_tipo_sangre_historia;
    private javax.swing.JLabel label_titulo;
    private javax.swing.JList list_clientes;
    private javax.swing.JPanel main_historia_medica;
    private javax.swing.JMenu menu_archivo_expedienteF;
    private javax.swing.JMenu menu_editar_expedienteF;
    private javax.swing.JMenuBar menubar_expedienteF;
    private javax.swing.JMenuItem menuitem_Cerrar;
    private javax.swing.JScrollPane scroll_List_clientes;
    private javax.swing.JScrollPane scroll_historia_medica;
    private javax.swing.JScrollPane scroll_tratamientos;
    private javax.swing.JPanel tab_examenes;
    private javax.swing.JPanel tab_historia_medica;
    private javax.swing.JPanel tab_tratamientos;
    private javax.swing.JTable table_trataminetos;
    private javax.swing.JTabbedPane tabs_expediente;
    private javax.swing.JTextField txt_caso_emergencia_historia;
    private javax.swing.JTextField txt_direccion_emergencia_historia;
    private javax.swing.JTextField txt_nombre_medico_historia;
    private javax.swing.JTextField txt_parentesco_emergencia_historia;
    private javax.swing.JTextField txt_pregunta_1_historia;
    private javax.swing.JTextField txt_pregunta_2_historia;
    private javax.swing.JTextField txt_pregunta_3_historia;
    private javax.swing.JTextField txt_pregunta_4_historia;
    private javax.swing.JTextField txt_pregunta_5_historia;
    private javax.swing.JTextField txt_pregunta_6_historia;
    private javax.swing.JTextField txt_pregunta_7_historia;
    private javax.swing.JTextField txt_telefono_emergencia_historia;
    // End of variables declaration//GEN-END:variables

    public JRadioButton getjRadioButtonCarieNO() {
        return jRadioButtonCarieNO;
    }

    public void setjRadioButtonCarieNO(JRadioButton jRadioButtonCarieNO) {
        this.jRadioButtonCarieNO = jRadioButtonCarieNO;
    }

    public JRadioButton getjRadioButtonCarieSI() {
        return jRadioButtonCarieSI;
    }

    public void setjRadioButtonCarieSI(JRadioButton jRadioButtonCarieSI) {
        this.jRadioButtonCarieSI = jRadioButtonCarieSI;
    }

    public JRadioButton getjRadioButtonOtroTipo() {
        return jRadioButtonOtroTipo;
    }

    public void setjRadioButtonOtroTipo(JRadioButton jRadioButtonOtroTipo) {
        this.jRadioButtonOtroTipo = jRadioButtonOtroTipo;
    }

    public JRadioButton getjRadioButtonOtroTipoPatologiaNO() {
        return jRadioButtonOtroTipoPatologiaNO;
    }

    public void setjRadioButtonOtroTipoPatologiaNO(JRadioButton jRadioButtonOtroTipoPatologiaNO) {
        this.jRadioButtonOtroTipoPatologiaNO = jRadioButtonOtroTipoPatologiaNO;
    }

    public JRadioButton getjRadioButtonOtroTipoPatologiaSI() {
        return jRadioButtonOtroTipoPatologiaSI;
    }

    public void setjRadioButtonOtroTipoPatologiaSI(JRadioButton jRadioButtonOtroTipoPatologiaSI) {
        this.jRadioButtonOtroTipoPatologiaSI = jRadioButtonOtroTipoPatologiaSI;
    }

    public JRadioButton getjRadioButtonPrePatologiaNO() {
        return jRadioButtonPrePatologiaNO;
    }

    public void setjRadioButtonPrePatologiaNO(JRadioButton jRadioButtonPrePatologiaNO) {
        this.jRadioButtonPrePatologiaNO = jRadioButtonPrePatologiaNO;
    }

    public JRadioButton getjRadioButtonPrePatologiaSI() {
        return jRadioButtonPrePatologiaSI;
    }

    public void setjRadioButtonPrePatologiaSI(JRadioButton jRadioButtonPrePatologiaSI) {
        this.jRadioButtonPrePatologiaSI = jRadioButtonPrePatologiaSI;
    }

    public JRadioButton getjRadioButtonProATMNO() {
        return jRadioButtonProATMNO;
    }

    public void setjRadioButtonProATMNO(JRadioButton jRadioButtonProATMNO) {
        this.jRadioButtonProATMNO = jRadioButtonProATMNO;
    }

    public JRadioButton getjRadioButtonProATMSI() {
        return jRadioButtonProATMSI;
    }

    public void setjRadioButtonProATMSI(JRadioButton jRadioButtonProATMSI) {
        this.jRadioButtonProATMSI = jRadioButtonProATMSI;
    }

    public JRadioButton getjRadioButtonProPeriodentalNO() {
        return jRadioButtonProPeriodentalNO;
    }

    public void setjRadioButtonProPeriodentalNO(JRadioButton jRadioButtonProPeriodentalNO) {
        this.jRadioButtonProPeriodentalNO = jRadioButtonProPeriodentalNO;
    }

    public JRadioButton getjRadioButtonProPeriodentalSI() {
        return jRadioButtonProPeriodentalSI;
    }

    public void setjRadioButtonProPeriodentalSI(JRadioButton jRadioButtonProPeriodentalSI) {
        this.jRadioButtonProPeriodentalSI = jRadioButtonProPeriodentalSI;
    }

    public JRadioButton getjRadioButtonRadioAleta() {
        return jRadioButtonRadioAleta;
    }

    public void setjRadioButtonRadioAleta(JRadioButton jRadioButtonRadioAleta) {
        this.jRadioButtonRadioAleta = jRadioButtonRadioAleta;
    }

    public JRadioButton getjRadioButtonRadioOclusal() {
        return jRadioButtonRadioOclusal;
    }

    public void setjRadioButtonRadioOclusal(JRadioButton jRadioButtonRadioOclusal) {
        this.jRadioButtonRadioOclusal = jRadioButtonRadioOclusal;
    }

    public JRadioButton getjRadioButtonRadioPanoramica() {
        return jRadioButtonRadioPanoramica;
    }

    public void setjRadioButtonRadioPanoramica(JRadioButton jRadioButtonRadioPanoramica) {
        this.jRadioButtonRadioPanoramica = jRadioButtonRadioPanoramica;
    }

    public JRadioButton getjRadioButtonRadioPeriapciales() {
        return jRadioButtonRadioPeriapciales;
    }

    public void setjRadioButtonRadioPeriapciales(JRadioButton jRadioButtonRadioPeriapciales) {
        this.jRadioButtonRadioPeriapciales = jRadioButtonRadioPeriapciales;
    }

    public JTextArea getjTextAreaEspecificar() {
        return jTextAreaEspecificar;
    }

    public void setjTextAreaEspecificar(JTextArea jTextAreaEspecificar) {
        this.jTextAreaEspecificar = jTextAreaEspecificar;
    }

    public JTextArea getjTextAreaObservaciones() {
        return jTextAreaObservaciones;
    }

    public void setjTextAreaObservaciones(JTextArea jTextAreaObservaciones) {
        this.jTextAreaObservaciones = jTextAreaObservaciones;
    }

    public JComboBox getjComboBoxIDs() {
        return jComboBoxIDs;
    }

    public void setjComboBoxIDs(JComboBox jComboBoxIDs) {
        this.jComboBoxIDs = jComboBoxIDs;
    }



}
